import { request } from '../request';

const api_name = '/admin/image'

export const GetImageList = (params:any) => {
  return request({
    url: `${api_name}/`,
    method: 'get',
    params: params,
  })
}

// 添加图片
export const SaveImpge = (Image:any) => {
  return request({
    url: `${api_name}/save`,
    method: 'post',
    data: Image,
  })
}
// 删除
export const  RemoveImpge= (id:string) => {
  return request({
    url: `${api_name}/remove`,
    method: 'delete',
    data: id
  })
}

// 修改分类id
export const UpdateImageById = (ImageById:string, id:string) => {
  return request({
    url: `${api_name}/UpdateImageById/${ImageById}/${id}`, // 将 ImageById 放到路径中
    method: 'get'
  });
}
